﻿using UnityEngine;
using System.Collections;
 
public class ItemBase 
{
    // 申明委托事件   
  //  public delegate void onDragHandler(object obj);

  //  public event onDragHandler onDrag;

    private string resPath = "Client/UI640/";

    public GameObject item { get; set; }

    public int itemOrder { get; set; }

    public int itemDep { get; set; }

    public Vector3 currentPosition { get; set; }

    public Vector3 nextPosition { get; set; }

    public ItemBase()
    {
    
    }

    public void initItemBase(string name)
    {
         item = (GameObject)Object.Instantiate(Resources.Load(resPath + name));
         item.name = name;
       
    }

    public void setItemDepth(int depth)
    {
        item.GetComponent<UI2DSprite>().depth = depth;
    }

  /* public void onDrag(object obj)
   {
       Debug.Log("GameObject drag" );
       TweenPosition.Begin(item, 2, new Vector3(item.transform.position.x + 140, item.transform.position.y + 140, 0));
       TweenScale.Begin(item, 2, new Vector3(0.8f, 0.8f, 1f)); ;
     
   }
    */

}
